package com.project.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @description: 轮播图
 * @author: longer
 * @create: 2020-12-18 17:46
 **/
@Data
@ApiModel(value = "轮播图")
@TableName(value = "cms_banner")
@Table(name = "cms_banner",comment = "轮播图")
public class CmsBanner implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 轮播id
     */
    @TableId
    @ApiModelProperty(value = "轮播id")
    @Column(type= MySqlTypeConstant.BIGINT,comment = "轮播id", length = 11, isKey = true, isAutoIncrement = true,isNull = false)
    private Long bannerId;

    /**
     * 标题
     */
    @ApiModelProperty(value = "标题")
    @NotNull(message = "请填写标题")
    @Column(comment = "标题")
    private String title;

    /**
     * 图片链接
     */
    @ApiModelProperty(value = "图片链接")
    @NotNull(message = "请添加图片")
    @Column(comment = "图片链接")
    private String url;

    /**
     * 展示类型(1:首页 2:首页中部 3:回收)
     */
    @ApiModelProperty(value = "展示类型(1:首页 2:首页中部 3:回收)")
    @NotNull(message = "请选择展示类型")
    @Column(comment = "展示类型(1:首页 2:首页中部 3:回收)")
    private Integer showType;

    /**
     * 排序
     */
    @ApiModelProperty(value = "排序")
    @Column(comment = "排序")
    private Integer sort = 1;

    /**
     * 跳转类型(1:单品 2:分类 3:H5)
     */
    @ApiModelProperty(value = "图片类型(1:单品 2:分类 3:H5)")
    @NotNull(message = "请选择跳转类型")
    @Column(comment = "跳转类型(1:单品 2:分类 3:H5)")
    private Integer type;

    /**
     * 商品分类ID
     */
    @ApiModelProperty(value = "商品分类ID")
    @Column(comment = "商品分类ID")
    private Long typeId;

    /**
     * 商品id
     */
    @ApiModelProperty(value = "商品id")
    @Column(comment = "商品id")
    private Long productId;

    /**
     * H5跳转链接
     */
    @ApiModelProperty(value = "H5跳转链接")
    @Column(comment = "H5跳转链接")
    private String jumpUrl;
}
